﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Atomic.Permission.Entities;
using FluentNHibernate.Mapping;

namespace Atomic.Permission.Mappings
{
    public class FormMap : ClassMap<FormEntity>
    {
        public FormMap()
        {
            Table("Form");
            Id(e => e.ID).GeneratedBy.Native();
            Map(e => e.ChildrenCount);
            Map(e => e.Cls).Length(255);
            Map(e => e.Enabled).CustomSqlType("int");
            Map(e => e.Key).Column("[Key]").Not.Nullable().Unique();
            Map(e => e.Name).Length(20).Not.Nullable();
            Map(e => e.PID);
            Map(e => e.Sort);
            Map(e => e.Url).Length(255);
        }
    }
}
